<link href="../addons/jy_yiliao/resource/css/weui.css" rel="stylesheet">
<link href="../addons/jy_yiliao/resource/css/zan.css?v=1" rel="stylesheet">
<style>
 
        html,
        body {
            position: static;
            height: auto;
            -webkit-overflow-scrolling: touch;
            background: #fff;
        }

        .weui-navbar .weui-navbar__item {
            background: #fff;
            padding: 15px 0;
            border-bottom: none;
            white-space: nowrap;
            font-size: 14px;
            position: relative;
            color: #333;
        }

        .weui-navbar .weui-navbar__item.lyb-active .weui-navbar__item__text {
            padding: 0;
            color: #C03E3E;
            background: transparent;
        }

        .weui-navbar .weui-navbar__item .weui-navbar__item__underline {
            height: 2px;
            width: 56px;
            position: absolute;
            left: 50%;
            bottom: 5px;
            -webkit-transform: translateX(-50%);
            transform: translateX(-50%);
            border-radius: 2px;
            background: #c03e3e;
            display: none;
        }

        .weui-navbar .weui-navbar__item.lyb-active .weui-navbar__item__underline {
            display: inline-block;
        }

        .YGY {
            color: #7A988B !important;
        }

        .TOBUY {
            color: #DBAB7C !important;
        }

        #info {
            background: url('//image-1252304461.file.myqcloud.com/image/profile/profile-head.png') center center no-repeat;
            background-size: 100% 100%;
        }

        .pull-wrapper .weui-btn {
            border-radius: 2px;
            font-size: 12px;
            color: #222222;
        }

        .pull-wrapper .weui-btn:after {
            border: 1px solid #ccc;
            font-size: 12px;
            color: #222222;
        }

        #view_all_list > div:last-child {
            margin-bottom: 0 !important;
        }

        .add-case {
            position: relative;
            padding-left: 14px!important;
            line-height: initial;
            float: right;
        }

        .add-case:before, .add-case:after {
            content: '';
            position: absolute;
            width: 1px;
            height: 21px;
            display: inline-block;
            background: #C03E3E;
            -webkit-transform: translateY(-50%) scale(0.5);;
            transform: translateY(-50%) scale(0.5);
            left: 5px;
            top: 50%;
        }
        .add-case:after {
            width: 21px;
            height: 1px;
            left: -5px;
        }

        .case-photo {
            vertical-align: top;
            margin: 0 8px 8px 0;
            -webkit-flex-shrink: 0;
            flex-shrink: 0;
        }

        .case-photo:nth-child(4n) {
            margin-right: 0;
        }

        span.node-item {
            padding: 8px 12px;
            margin: 0px 12px 12px 0;
            border: solid 1px #ccc;
            white-space: nowrap;
            display: inline-block;
            border-radius: 2px;
        }

        span.node-item.lyb-active {
            display: inline-block;
            border-color: #C03E3E;
            color: #C03E3E;
        }

        .his-flex-grow {
            word-break: break-all;
        }
		 a.illness-item {
            display: inline-block;
            border: solid 1px #e6e6e6;
            padding: 7px 12px;
            margin-right: 8px;
            margin-bottom: 8px;
            color: #0d0d0d;
            border-radius: 2px;
        }
		a.illness-item.active{color: #C03E3E; border: solid 1px #C03E3E;}
    
</style>
<div class='fui-page order-create-page'>
<div class="single-page-container">
        <div id="info" class="his-center" style="padding: 20px 12px;position:fixed;left: 0;right: 0;z-index: 1;height: 80px;">
			<div class="subtitle bold" style="font-size:0.86rem;height:1.5rem;color:#fff">
				{{pagedata.body.name}}
			</div>
			<div class="subtitle" style="-webkit-line-clamp:2;height:1.5rem;color:#fff">
				{{pagedata.body.year}}岁 | {{pagedata.body.sex}} | {{pagedata.body.mobile}}
			</div>
		</div>
        <div id="tabs" class="weui-tab">
            <div class="weui-navbar weui-tab-titles" style="position:fixed;top: 78px;left: 0;right: 0;z-index: 1;">
                <div ng-class="{'weui-navbar__item':1, 'lyb-active':pagedata.params.type==0}" ng-click="pagedata.params.type=0">
                    <span class="weui-navbar__item__text">看诊记录</span>
                    <div class="weui-navbar__item__underline"></div>
                </div>
                <div ng-class="{'weui-navbar__item':1, 'lyb-active':pagedata.params.type==1}" ng-click="pagedata.params.type=1">
                    <span class="weui-navbar__item__text">自建病历</span>
                    <div class="weui-navbar__item__underline"></div>
                </div>
                <div ng-class="{'weui-navbar__item':1, 'lyb-active':pagedata.params.type==2}" ng-click="pagedata.params.type=2">
                    <span class="weui-navbar__item__text">病史信息</span>
                    <div class="weui-navbar__item__underline"></div>
                </div>
            </div>
        </div>
        <div id="sliderSegmentedContent" style="padding-top: 124px;">
			<div class="light-color margin10 radius4 his-flex" style="background: #F9EEE3;padding: 9px 16px 9px 16px;">
				<span class="icon-laba font18 white-color marginRight8 his-flex-unshrink"></span>
				<span ng-if="pagedata.params.type==0" class="middle-color font12 lineHeight18" style="vertical-align: middle;">所有处方会有2天的有效期，2天内可支付购药，处方过期后需要联系医生重新为您开方</span>
				<span ng-if="pagedata.params.type==1" class="middle-color font12 lineHeight18" style="vertical-align: middle;">将其他医馆的看诊记录在此，让大夫更了解您。</span>
				<span ng-if="pagedata.params.type==2" class="middle-color font12 lineHeight18" style="vertical-align: middle;">填写既往病史、过敏史、手术史、家族病史，让大夫更了解您</span>
			</div>
			<div ng-if="!pagedata.add_jianli">
			<div ng-if="pagedata.params.type!=2" id="view_all" class="pull-wrapper" style="position:static;">
				<div class="pull-load-block down"></div>
				<div class="pull-border" style="position:static;">
					<div id="view_all_list">
					<div ng-if="pagedata.params.type==0 && pagedata.list.length>0" class="fui-list-group" style="background:#fff;padding:0.25rem 0.5rem;margin-top:0">
							<div class="fui-list" ng-repeat="item in pagedata.list" style="border-radius:0.5rem;margin-bottom:0.3rem;background:#f2f2f2">
							   <div class="fui-list-inner" style="margin-top:0.16rem">
									<div class="title" style="font-size:0.76rem;height:2rem;line-height:2rem">
										<span>医生信息:{{item.workertitle}}</span>
									</div>
									<div class="subtitle" style="-webkit-line-clamp:2;height:1.5rem">
										下单时间：{{item.createtime}}
									</div>
								</div>
							</div>
					</div>
					<div ng-if="pagedata.params.type==1 && pagedata.body.jianli.length>0" class="fui-list-group" style="background:#fff;padding:0.25rem 0.5rem;margin-top:0">
							<div class="fui-list" ng-repeat="item in pagedata.body.jianli" style="border-radius:0.5rem;margin-bottom:0.3rem;background:#f2f2f2">
							   <div class="fui-list-inner" style="margin-top:0.16rem">
									<div class="title" style="font-size:0.76rem;height:2rem;line-height:2rem">
										<span>主诉</span>
									</div>
									<div class="subtitle" style="-webkit-line-clamp:2;height:1.5rem">
										{{item.data0}}
									</div>
								</div>
							</div>
					</div>
					</div>
				</div>
				<div ng-if="pagedata.params.type==0 && pagedata.list.length==0" class="his-center">
					<img style="height:5rem" src="../addons/jy_yiliao/resource/images/nvhai.png"/>
					<div style="font-size:0.7rem;line-height:1.3rem">还未看诊，寻找合适的医生</div>
					<a style="font-size:0.7rem;color:#C03E3E" href="javascript:" ng-click="access_json('jy_yiliao/worker_list//')">点这里找名医 >></a>
				</div>
				<div ng-if="pagedata.params.type==1 && pagedata.body.jianli.length==0" class="his-center">
					<img style="height:5rem" src="../addons/jy_yiliao/resource/images/nvhai.png"/>
					<div style="font-size:0.7rem;line-height:1.3rem">添加病历，让大夫更了解您！</div>
					<a style="font-size:0.7rem;color:#C03E3E" href="javascript:" ng-click="pagedata.add_jianli=true">马上新增简历 >></a>
				</div>
				<div class="pull-load-block up">
					<div class="his-title-line"> 
					<span class="light-color font12 padding-0-5">上拉显示更多</span>
					</div>
				</div>
			</div>
			<div ng-if="pagedata.params.type==2" id="view_all" class="pull-wrapper" style="position:static;padding-bottom:3rem">
				<div class="weui-panel marginBottom8 no-after-line no-before-line">
					<div class="weui-panel__hd deep-color fontBold no-after-line" style="font-size: 19px;padding: 20px 12px 12px 12px;">既往病史</div>
					<div class="weui-panel__bd" style="padding: 0 12px;">
						<a ng-repeat="item in pagedata.labels" ng-class="{'illness-item':1,'active':pagedata.post.labels.indexOf(';'+item.id+';')>=0}" ng-click="duoxuans(item.id,pagedata.post,'labels')">{{item.title}}</a>
					</div>
					<div class="weui-panel__bd" style="padding:10px">
							<textarea id="remark" ng-model="pagedata.post.remark0" class="weui-textarea question" rows="2" placeholder="其他（最多300字）"></textarea>
					</div>
				</div>
				<div class="weui-panel marginBottom8 no-after-line no-before-line">
					<div class="weui-panel__hd deep-color fontBold no-after-line" style="font-size: 19px;padding: 20px 12px 12px 12px;">过敏史</div>
					<div class="weui-panel__bd" style="padding: 0 12px;">
						<a ng-repeat="item in pagedata.labels1" ng-class="{'illness-item':1,'active':pagedata.post.labels.indexOf(';'+item.id+';')>=0}" ng-click="duoxuans(item.id,pagedata.post,'labels')">{{item.title}}</a>
					</div>
					<div class="weui-panel__bd"  style="padding:10px">
							<textarea id="remark" ng-model="pagedata.post.remark1" class="weui-textarea question" rows="2" placeholder="其他（最多300字）"></textarea>
					</div>
				</div>
				<div class="weui-panel marginBottom8 no-after-line no-before-line">
					<div class="weui-panel__hd deep-color fontBold no-after-line" style="font-size: 19px;padding: 20px 12px 12px 12px;">家族病史</div>
					<div class="weui-panel__hd deep-color fontBold no-after-line" style="font-size: 19px;padding: 20px 12px 12px 12px;">父系</div>
					<div class="weui-panel__bd" style="padding: 0 12px;">
						<a ng-repeat="item in pagedata.labels2" ng-class="{'illness-item':1,'active':pagedata.post.labels.indexOf(';'+item.id+';')>=0}" ng-click="duoxuans(item.id,pagedata.post,'labels')">{{item.title}}</a>
					</div>
					<div class="weui-panel__bd"  style="padding:10px">
							<textarea id="remark" ng-model="pagedata.post.remark2_1" class="weui-textarea question" rows="2" placeholder="其他（最多300字）"></textarea>
					</div>
					<div class="weui-panel__hd deep-color fontBold no-after-line" style="font-size: 19px;padding: 20px 12px 12px 12px;">母系</div>
					<div class="weui-panel__bd" style="padding: 0 12px;">
						<a ng-repeat="item in pagedata.labels2" ng-class="{'illness-item':1,'active':pagedata.post.labels.indexOf(';'+item.id+';')>=0}" ng-click="duoxuans(item.id,pagedata.post,'labels')">{{item.title}}</a>
					</div>
					<div class="weui-panel__bd"  style="padding:10px">
							<textarea id="remark" ng-model="pagedata.post.remark2_2" class="weui-textarea question" rows="2" placeholder="其他（最多300字）"></textarea>
					</div>
					
				</div>
				<div class="weui-panel marginBottom8 no-after-line no-before-line">
					<div class="weui-panel__hd deep-color fontBold no-after-line" style="font-size: 19px;padding: 20px 12px 12px 12px;">手术史</div>
					<div class="weui-panel__bd" style="padding: 0 12px;">
						<a ng-repeat="item in pagedata.labels3" ng-class="{'illness-item':1,'active':pagedata.post.labels.indexOf(';'+item.id+';')>=0}" ng-click="duoxuans(item.id,pagedata.post,'labels')">{{item.title}}</a>
					</div>
					<div class="weui-panel__bd"  style="padding:10px">
							<textarea id="remark" ng-model="pagedata.post.remark3" class="weui-textarea question" rows="2" placeholder="其他（最多300字）"></textarea>
					</div>
				</div>
				<div class="weui-panel marginBottom8 no-after-line no-before-line">
					<div class="weui-panel__hd deep-color fontBold no-after-line" style="font-size: 19px;padding: 20px 12px 12px 12px;">其他</div>
					<div class="weui-panel__bd"  style="padding:10px">
							<textarea id="remark" ng-model="pagedata.post.remark4" class="weui-textarea question" rows="2" placeholder="其他（最多300字）"></textarea>
					</div>
				</div>
				<div class="fui-navbar">
					<a class="nav-item btn buybtn" href='javascript:;' ng-click="post(pagedata.post,'post')">
						保存
					</a>
				</div>
			</div>
			</div>
			<div ng-if="pagedata.add_jianli">
				<div id="view_all" class="pull-wrapper" style="position:static;padding-bottom:3rem">
				<div class="weui-panel marginBottom8 no-after-line no-before-line">
					<div class="weui-panel__hd deep-color fontBold no-after-line" style="font-size: 19px;padding: 20px 12px 12px 12px;">患者主诉</div>
					<div class="weui-panel__bd" style="padding:10px">
							<textarea id="remark" ng-model="pagedata.addjianli.data0" class="weui-textarea question" rows="2" placeholder="其他（最多300字）"></textarea>
					</div>
				</div>
				<div class="weui-panel marginBottom8 no-after-line no-before-line">
					<div class="weui-panel__hd deep-color fontBold no-after-line" style="font-size: 19px;padding: 20px 12px 12px 12px;">诊断</div>
					<div class="weui-panel__bd" style="padding:10px">
							<textarea id="remark" ng-model="pagedata.addjianli.data1" class="weui-textarea question" rows="2" placeholder="其他（最多300字）"></textarea>
					</div>
				</div>
				<div class="weui-panel marginBottom8 no-after-line no-before-line">
					<div class="weui-panel__hd deep-color fontBold no-after-line" style="font-size: 19px;padding: 20px 12px 12px 12px;">治疗</div>
					<div class="weui-panel__bd" style="padding:10px">
							<textarea id="remark" ng-model="pagedata.addjianli.data2" class="weui-textarea question" rows="2" placeholder="其他（最多300字）"></textarea>
					</div>
				</div>
				<div class="weui-panel marginBottom8 no-after-line no-before-line">
					<div class="weui-panel__hd deep-color fontBold no-after-line" style="font-size: 19px;padding: 20px 12px 12px 12px;">照片</div>
					<div class="weui-panel__bd" style="padding:10px">
							<div class="weui_uploader">
								<div class="weui_uploader_bd" style="margin-bottom:0">
									<ul class="weui_uploader_files">
										<li ng-repeat="p in pagedata.addjianli.images" class="weui_uploader_file" style="background-image:url('{{tomedia(p)}}')">
											<div class="upbtn" >
												<a style="color:#f60" href="javascript:;" ng-click="pagedata.addjianli.images.splice($index-1,0,p);pagedata.addjianli.images.splice($index+1,1)">上移</a>
												<a style="color:#f60" href="javascript:;" ng-click="pagedata.addjianli.images.splice($index,1)">删除</a>
											</div>
										</li>
									</ul>
									<div class="weui_uploader_input_wrp" href="javascript:;" ng-click="images(pagedata.addjianli,'images')"></div>
								</div>
							</div>
					</div>
				</div>
				<div class="fui-navbar">
					<a class="nav-item btn buybtn" href='javascript:;' ng-click="post(pagedata.addjianli,'addjianli')">
						保存
					</a>
				</div>
				</div>
			</div>
		</div>
</div>
</div>
<script type="text/javascript">
//手机软键盘--搜索
$("body").keydown(function() {
    if (event.keyCode == "13") {
        $('#searchsub').click();
    }
});
scope.pagedata.loading = true;
scope.pagedata.params.type=0	
scope.tool.get_list('jy_yiliao/yuyue_order/getlist/',true);
if(scope.pagedata.params.type==0){
	scope.pagedata.scroll_bottom=function(){
		scope.tool.get_list('jy_yiliao/yuyue_order/getlist/');
	}
}
//手机软键盘--搜索
$("body").keydown(function() {
    if (event.keyCode == "13") {
        $('#searchsub').click();
    }
});
</script>